home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / dvlprstc.hqx / Developer Stack 1.3r / card_5204.txt < prev    next >
Text File  |  1991-04-30  |  1KB  |  74 lines

  1. -- card: 5204 from stack: in.3r
  2. -- bmap block id: 40835
  3. -- flags: 4000
  4. -- background id: 2612
  5. -- name: DeProtect
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A004
  11. -- rect: left=187 top=233 right=284 bottom=265
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 27056 / 27056
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Try It
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   if the optionkey is down then pass mouseup
  23.   put "Please select a protected stack"
  24.   set cursor to 4
  25.   put filename("STAK") into fname
  26.   if fname is empty then
  27.     play oops
  28.     hide message window
  29.     exit mouseUp
  30.   end if
  31.  
  32.   deprotect fname
  33.  
  34.   if the result is empty
  35.   then answer "Deprotect Successful" with "OK"
  36. else osErr the result
  37. end mouseUp
  38.  
  39.  
  40.  
  41. -- part contents for background part 2
  42. ----- text -----
  43. DeProtect
  44.  
  45. -- part contents for background part 3
  46. ----- text -----
  47.  
  48. Calling this will let you remove the standard Hypercard protection from any stack.
  49.  
  50.  
  51. Thanks to:
  52. Ned Horvath
  53. Allan Foster
  54.  
  55. -- part contents for background part 10
  56. ----- text -----
  57. Syntax:
  58.  
  59. DeProtect <filePathName>
  60.  
  61. <filename> is the full path name of a Hypercard Stack. 
  62.  
  63. If no value is returned to 'the result', then deprotection was successful.  
  64.  
  65. To correctly handle other error codes, use the osErr* command.
  66.  
  67.  
  68. -- part contents for background part 13
  69. ----- text -----
  70. 1
  71.  
  72. -- part contents for background part 30
  73. ----- text -----
  74. XCMD